package com.manage.func.ordermanagement.loanorder.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.manage.base.dao.impl.BaseDaoImpl;
import com.manage.func.ordermanagement.loanorder.dao.ILoanOrderDao;
import com.manage.func.ordermanagement.loanorder.model.LoanOrderBean;
import com.manage.func.ordermanagement.loanorder.model.LoanOrderBooksBean;
import com.manage.func.ordermanagement.loanorder.model.LoanOrderExcelBean;
import com.manage.func.ordermanagement.loanorder.model.LoanOrderExportQueryBean;

@Repository("loanOrderDao")
public class LoanOrderDaoImpl extends BaseDaoImpl<LoanOrderBean>implements ILoanOrderDao {

	@Override
	public List<LoanOrderBean> selectLoanOrderList(LoanOrderBean bean) {
		return getSqlSession().selectList("LoanOrderMapper.selectLoanOrderList", bean);
	}

	@Override
	public int updateLoanOrder(LoanOrderBean queryBean) {
		return getSqlSession().update("LoanOrderMapper.updateLoanOrder", queryBean);
	}
	
	@Override
	public int updateExpressMessage(LoanOrderBean queryBean) {
		return getSqlSession().update("LoanOrderMapper.updateExpressMessage", queryBean);
	}

	@Override
	public int selectTotalCount(LoanOrderBean queryBean) {
		return getSqlSession().selectOne("LoanOrderMapper.selectTotalCount", queryBean);
	}
	
	@Override
	public List<LoanOrderBooksBean> selectLoanOrderBooks(LoanOrderBean queryBean) {
		return getSqlSession().selectList("LoanOrderMapper.selectLoanOrderBooks", queryBean);
	}
	
	@Override
	public int deleteLoanOrder(LoanOrderBean queryBean) {
		return getSqlSession().delete("LoanOrderMapper.deleteLoanOrder", queryBean);
	}
	
	@Override
	public int deleteLoanOrderDetail(LoanOrderBean queryBean) {
		return getSqlSession().delete("LoanOrderMapper.deleteLoanOrderDetail", queryBean);
	}

	@Override
	public int insertCart(LoanOrderBean queryBean) {
		return getSqlSession().insert("LoanOrderMapper.insertCart", queryBean);
	}

	@Override
	public List<LoanOrderExcelBean> selectLoanOrderExcel(LoanOrderExportQueryBean queryBean)
	{
		return getSqlSession().selectList("LoanOrderMapper.selectLoanOrderExcel", queryBean);
	}
}
